package com.mes.basicdata.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bstek.dorado.annotation.DataProvider;
import com.mes.basicdata.dao.iface.ITypesDataDao;
import com.mes.basicdata.domain.TypesData;
import com.mes.common.service.BasicService;

@Service
public class TypesDataService extends BasicService<TypesData> {

	@Autowired
	private ITypesDataDao typesDataDao;
	
	//根据类型名称查询
	@DataProvider
	public List<TypesData> getTypesDatasByTypeName(Map<String, Object> params){
		if (params != null){
			List<TypesData> list = typesDataDao.getTypesDatasByTypeName(params);
			return list;
		}else {
			return null;
		}
	}
	
	//根据类型名称查询
	@DataProvider
	public String getTypeIdDescByTypeName(String typeName, String typeId){
		return typesDataDao.getTypeIdDescByTypeName(typeName, typeId);
	}
	
	//得到类型名称的集合
	@DataProvider
	public List<TypesData> getTypeNames(){
		return typesDataDao.getTypeNames();
	}
}
